package com.example.book.in.dao;

import com.example.book.base.BaseDao;
import com.example.book.in.entity.BookInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.awt.print.Book;
import java.util.List;

/**
 * @author hcj
 */
@Mapper
public interface BookInfoDao extends BaseDao<BookInfo> {

    List<BookInfo> findEndBookByRand(@Param("limit") Integer limit);

    /**
     * 模糊分页查询
     *
     * @param bookInfo
     * @return
     */
    List<BookInfo> findListBySearch(BookInfo bookInfo);

    void setPopularSearches(@Param("id") String id);

    List<BookInfo> selectPopularSearches(@Param("limit") Integer limit);

    List<BookInfo> findListByLimit(@Param("limit") Integer limit);
}